let option = {

	title: [{
		text: "当月岗位效率分析（分钟）",
		left: "left",
		textStyle: { //设置主标题风格
			color: "#3EA3FF"
		}
	}, {
		subtext: "查看更多>",
		left: "right",
		sublink: '/kfrp/login.jsp/detail?status=2',
		subtextStyle: { //设置主标题风格
			color: "#3EA3FF"
		}
	}],
	legend: {

	},
	grid: {
		show: true,
		borderColor: "#00529D",
		borderWidth: 0,
		left: '3%',
		right: '4%',
		bottom: '3%',
		containLabel: true
	},
	tooltip: {
		trigger: 'axis',
		axisPointer: {
			type: 'shadow'
		}
	},
	xAxis: {
		type: 'category',
		data: [],
		splitLine: {
			show: false
		},
		axisLabel: {
			show: true,
			textStyle: {
				color: '#333'
			},
			interval: 0,
			formatter: function(value) {
				var ret = ""; //拼接加\n返回的类目项
				var maxLength = 1; //每项显示文字个数
				var valLength = value.length; //X轴类目项的文字个数
				var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
				if (rowN > 1) {

					for (var i = 0; i < rowN; i++) {
						var temp = ""; //每次截取的字符串
						var start = i * maxLength; //开始截取的位置
						var end = start + maxLength; //结束截取的位置
						//这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
						temp = value.substring(start, end) + "\n";
						ret += temp; //凭借最终的字符串
					}
					return ret;
				} else {
					return value;
				}
			}
		},

	},
	yAxis: {
		type: 'value',
		splitLine: {
			show: false
		},
		axisLabel: {
			show: true,
			textStyle: {
				color: '#333'
			}
		},
	},
	series: [{
		type: 'bar',
		data: [],
		itemStyle: {
			normal: {
				//这里是重点
				color: function(params) {
					var colorList = ['#FBC446', '#A447C4', '#01C3CF', '#27CF39', '#1161EA',
						'#749f83', '#ca8622'
					];
					return colorList[params.dataIndex % colorList.length];
				}
			}
		}

	}, ]
};

export default option;
